function objectFactory() { //new
    let obj = {}
        // 把shift方法借给arguments用  
        // console.log(arguments);
    var Constructor = [].shift.call(arguments)
    obj.__proto__ = Constructor.prototype;
    var ret = Constructor.apply(obj, arguments);
    return typeof ret === 'object' ? ret || obj : obj //实例
}

function Person(name, age) {
    this.name = name
    this.age = age
    return {
        name,
        age,
        bb: '11'
    }
}
// const p=new Person('yangxiang',18);
let p = objectFactory(Person, 'yangxiang', 18) //引用式赋值